/* 全局样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* 主应用容器 */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* 应用头部 */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #2c3e50;
  color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.app-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.header-actions button {
  padding: 0.5rem 1rem;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.header-actions button:hover {
  background-color: #2980b9;
}

/* 主内容区域 */
.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* 左侧组件面板 */
.left-panel {
  width: 250px;
  background-color: #fff;
  border-right: 1px solid #e0e0e0;
  padding: 1rem;
  overflow-y: auto;
}

.left-panel h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
}

.components-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.component-item {
  padding: 1rem;
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  cursor: grab;
  transition: all 0.2s;
}

.component-item:hover {
  background-color: #e8f4fd;
  border-color: #3498db;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.component-item:active {
  cursor: grabbing;
}

.component-item h3 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.component-item p {
  font-size: 0.8rem;
  color: #7f8c8d;
}

/* 中间画布容器 */
.canvas-container {
  flex: 1;
  position: relative;
  background-color: #fafafa;
}

.reactflow-wrapper {
  width: 100%;
  height: 100%;
}

/* 移除自定义样式，让ReactFlow使用默认样式以确保连接功能正常工作 */
/* 只保留必要的画布样式 */
.reactflow-wrapper {
  flex: 1;
  height: 100%;
  width: 100%;
}

.node-header {
  font-weight: 600;
  font-size: 0.9rem;
  color: #2c3e50;
  margin-bottom: 0.4rem;
}

.node-type {
  font-size: 0.75rem;
  color: #7f8c8d;
  background-color: #ecf0f1;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
}

/* YAML视图样式 */
.yaml-view {
  width: 100%;
  height: 100%;
  padding: 1rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.yaml-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}

.yaml-header h3 {
  font-size: 1.2rem;
  color: #2c3e50;
}

.yaml-actions {
  display: flex;
  gap: 0.5rem;
}

.yaml-actions button {
  padding: 0.4rem 0.8rem;
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background-color 0.2s;
}

.yaml-actions button:hover {
  background-color: #229954;
}

.yaml-content {
  flex: 1;
  background-color: #282c34;
  color: #abb2bf;
  padding: 1rem;
  border-radius: 6px;
  overflow: auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* 右侧属性面板 */
.right-panel {
  width: 300px;
  background-color: #fff;
  border-left: 1px solid #e0e0e0;
  padding: 1rem;
  overflow-y: auto;
}

.right-panel h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 0.5rem;
}

.properties-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.properties-header h2 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 1.2rem;
  color: #2c3e50;
}

.delete-button {
  background-color: #ff4d4f;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.delete-button:hover {
  background-color: #ff7875;
}","},{

.property-group {
  margin-bottom: 1.5rem;
}

.property-group h3 {
  font-size: 1rem;
  margin-bottom: 0.8rem;
  color: #34495e;
}

.property {
  margin-bottom: 0.8rem;
}

.property label {
  display: block;
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.property input[type="text"],
.property input[type="number"],
.property textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.property input[type="text"]:focus,
.property input[type="number"]:focus,
.property textarea:focus {
  outline: none;
  border-color: #3498db;
}

.property textarea {
  min-height: 80px;
  resize: vertical;
  font-family: 'Courier New', Courier, monospace;
}

.property span {
  font-size: 0.9rem;
  color: #2c3e50;
  background-color: #ecf0f1;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .left-panel {
    width: 200px;
  }
  
  .right-panel {
    width: 250px;
  }
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }
  
  .left-panel,
  .right-panel {
    width: 100%;
    height: auto;
    border: none;
  }
  
  .canvas-container {
    min-height: 500px;
  }
}
